#pragma once
#include "Singleton.h"
#include "Define.h"
#include "MuObject.h"
#include <map>

namespace Next
{
	using namespace Patterns;
	using namespace std;

	namespace GameServer
	{
		using namespace Objects;

		namespace Managers
		{
			class CObjectManager : public TSingleton<CObjectManager>
			{
				friend class TSingleton<CObjectManager>;

				private:
					map<unsigned short, CMuObject*> mapObjects;
					unsigned int uPlayerCount;
					unsigned int uMonsterCount;//NPC and Monster

				protected:
					CObjectManager(void);
					~CObjectManager(void);

			public:
				bool AddObject(CMuObject* muObject);
				bool DelObject(CMuObject* muObject);
				CMuObject* GetObject(unsigned short index);
				CMuObject* GetObject(string name);
			};
		}
	}
}
